]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Don't allow move-to-workspace for always-sticky windows
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 25 Mar 2015 22:35:36 +0000 (23:35 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 26 Mar 2015 11:19:33 +0000 (12:19 +0100)
"Moving" a window to another workspace doesn't make sense when it cannot
be unstuck, and is potentially confusing if a new workspace is added at
the start/end - just don't do anything in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=746782

js/ui/windowManager.js

index d04455b9f5bb08d3b8e906e7d79eb1d389520405..bdde74637238f1f91513124f74c5370e176f2208 100644 (file)
@@ -1626,6 +1626,16 @@ const WindowManager = new Lang.Class({
         let newWs;
         let direction;
 
+        if (action == 'move') {
+            // "Moving" a window to another workspace doesn't make sense when
+            // it cannot be unstuck, and is potentially confusing if a new
+            // workspaces is added at the start/end
+            if (window.is_always_on_all_workspaces() ||
+                (Meta.prefs_get_workspaces_only_on_primary() &&
+                 window.get_monitor() != Main.layoutManager.primaryIndex))
+              return;
+        }
+
         if (target == 'last') {
             direction = Meta.MotionDirection.DOWN;
             newWs = screen.get_workspace_by_index(screen.n_workspaces - 1);